﻿package classes
{
	import flash.display.Stage;
	import flash.events.Event;
	import classes.*;
	import classes.events.MenuItemEvent;
	import flash.display.MovieClip;
	/**
	 * ...
	 * @author ...
	 */
	public class CaveCraftGame extends MovieClip 
	{
		private var gameMenu:GameMenu;
		//private var caveCraft:CaveCraft;
		private var caveTracks:Array = new Array();
		private var gameRunning:Boolean = false;
		
		public function CaveCraftGame():void
		{
				this.showMenu();
		}
		
		public function loadTracksFromXml(xmlpath:String):Boolean
		{
			return null;
		}
		
		public function runGame():void 
		{
			
		}
		
		public function stopGame():void 
		{
			
		}
		
		public function showMenu():void 
		{
			this.gameMenu = new GameMenu(this);
			this.gameMenu.addEventListener(MenuItemEvent.MENU_CLICK_EVENT,handleMenuEvents);
			this.gameMenu.showMenu();
		}
		
		public function hideMenu():void
		{
			
		}
		
		public function handleMenuEvents(e:MenuItemEvent):void
		{
			trace(e.getMenuName() + " clicked!");
		}
	}
	
}